/**
 * 文件名称 : AndroidSound.java
 * <p>
 * 作者信息 : maidou
 * <p>
 * 创建时间 : 2011-8-3, 上午6:20:56
 * <p>
 * 版权声明 : Copyright (c) 2009-2012 CIeNET Ltd. All rights reserved
 * <p>
 * 评审记录 :
 * <p>
 */

package com.ttomato.game.framework.impl;

import android.media.SoundPool;

import com.ttomato.game.framework.Sound;

/**
 * 请在这里增加文件描述
 * <p>
 */
public class AndroidSound implements Sound
{
    int mSoundId;
    
    SoundPool mSoundPool;
    
    public AndroidSound(int soundId, SoundPool soundPool)
    {
        mSoundId = soundId;
        mSoundPool = soundPool;
    }
    
    
    public void play(float volum)
    {
        // TODO Auto-generated method stub
        mSoundPool.play(mSoundId, volum, volum, 0, 0, 1);
    }
    
    
    public void dispose()
    {
        // TODO Auto-generated method stub
        mSoundPool.unload(mSoundId);
    }
    
}
